<?php 
// +---------------------------------------------------------------------------+
// | This file is part of a Book Store project.                                |
// | Copyright (c) 2005-2007 the Bsto Project.                                 |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code. You can also view the    |
// | LICENSE file online at http://                                            |
// |   vi: set noexpandtab:                                                    |
// |   Local Variables:                                                        |
// |   indent-tabs-mode: t                                                     |
// |   End:                                                                    |
// +---------------------------------------------------------------------------+

// start using session
session_start();
 
// turn on reporting
error_reporting(E_ALL);

// set timezone
date_default_timezone_set('Asia/Ho_Chi_Minh');

// reject directly run
define('IN_BSTO', true);

// define website path
$bstoPath = realpath(dirname(dirname(__FILE__)));

define ('BSTO_PATH', $bstoPath);

//global $COOKIE_NAME;
//global $COOKIE_USER;

//echo BSTO_PATH;

// load init file
include BSTO_PATH . '/application/init.php';

// init Router
$bsto->router = new Router($bsto);

// set back-end page
$bsto->admincp = true;

// set debug mode
$bsto->debug = true;

// set controller path
$bsto->router->setPath (BSTO_PATH . '/admincp/controller');

// set root path
define('BSTO_ROOT_PATH', $bsto->router->getRoot());

// init Template Engine
$bsto->template = new Template($bsto);

$bsto->db = new DB($bsto);

$bsto->db->startConnection();

// run the app
$bsto->router->loader();

$bsto->db->closeConnection();

//echo BSTO_ROOT_PATH;

 
?>